/*
 * Copyright (c) 2007 Aleksey Nikiforov
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 *
 * * Redistributions of source code must retain the above copyright
 *   notice, this list of conditions and the following disclaimer.
 *
 * * Redistributions in binary form must reproduce the above copyright
 *   notice, this list of conditions and the following disclaimer in the
 *   documentation and/or other materials provided with the distribution.
 *
 * * Neither the name of 'Aleksey Nikiforov' nor the names of other contributors 
 *   may be used to endorse or promote products derived from this software 
 *   without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

package org.lex.game;


import static org.lex.input.StrategicHandler.*;
import static org.lex.input.StrategicCameraEffects.*;

import java.util.HashMap;

/**
 * This class is mainly for testing purposes.
 * 
 * @author lex
 *
 */
public class StrategicHandlerDefaults {
	
	@SuppressWarnings("unchecked")
	public static HashMap getDefaultConfig() {
		HashMap props = new HashMap();
		
		props.put(PROP_CAM_HEIGHT_OFFSET, DEFAULT_CAM_HEIGHT_OFFSET);
		props.put(PROP_KEYBOARD_LOOK_ENABLED, DEFAULT_KEYBOARD_LOOK_ENABLED);
		props.put(PROP_KEYBOARD_SCROLL_ENABLED,DEFAULT_KEYBOARD_SCROLL_ENABLED);
		props.put(PROP_MOUSE_LOOK_ENABLED, DEFAULT_MOUSE_LOOK_ENABLED);
		props.put(PROP_MOUSE_SCROLL_ENABLED, DEFAULT_MOUSE_SCROLL_ENABLED);
		
		props.put(PROP_MOUSE_INVERT_X, DEFAULT_INVERT_MOUSE_X);
		props.put(PROP_MOUSE_INVERT_Y, DEFAULT_INVERT_MOUSE_Y);
		props.put(PROP_MOUSE_INVERT_WEEL, DEFAULT_INVERT_MOUSE_WEEL);
		props.put(PROP_MOUSE_SCROLL_BORDER, DEFAULT_SCROLL_BORDER);
		
		props.put(PROP_FOLLOW_SPRING, DEFAULT_FOLLOW_SPRING);
		props.put(PROP_FOLLOW_DAMPING, DEFAULT_FOLLOW_DAMPING);
		
		props.put(PROP_MOUSE_ROTATION_SENSITIVITY,
				DEFAULT_MOUSE_ROTATION_SENSITIVITY);
		props.put(PROP_MOUSE_ROTATION_INTERPOLATION,
				DEFAULT_MOUSE_ROTATION_INTERPOLATION);
		props.put(PROP_MOUSE_ZOOM_SENSITIVITY, DEFAULT_MOUSE_ZOOM_SENSITIVITY);
		props.put(PROP_MOUSE_ZOOM_SPRING, DEFAULT_MOUSE_ZOOM_SPRING);
		props.put(PROP_MOUSE_ZOOM_DAMPING, DEFAULT_MOUSE_ZOOM_DAMPING);
		
		props.put(PROP_KEYBOARD_HORIZONTAL_FORCE,
				DEFAULT_KEYBOARD_HORIZONTAL_FORCE);
		props.put(PROP_KEYBOARD_HORIZONTAL_DAMPING,
				DEFAULT_KEYBOARD_HORIZONTAL_DAMPING);
		props.put(PROP_KEYBOARD_HORIZONTAL_MAXSPEED,
				DEFAULT_KEYBOARD_HORIZONTAL_MAXSPEED);
		props.put(PROP_KEYBOARD_VERTICAL_FORCE,DEFAULT_KEYBOARD_VERTICAL_FORCE);
		props.put(PROP_KEYBOARD_VERTICAL_DAMPING,
				DEFAULT_KEYBOARD_VERTICAL_DAMPING);
		props.put(PROP_KEYBOARD_VERTICAL_MAXSPEED,
				DEFAULT_KEYBOARD_VERTICAL_MAXSPEED);
		props.put(PROP_KEYBOARD_ZOOM_FORCE, DEFAULT_KEYBOARD_ZOOM_FORCE);
		props.put(PROP_KEYBOARD_ZOOM_DAMPING, DEFAULT_KEYBOARD_ZOOM_DAMPING);
		props.put(PROP_KEYBOARD_ZOOM_MAXSPEED, DEFAULT_KEYBOARD_ZOOM_MAXSPEED);
		
		props.put(PROP_MOUSE_SCROLL_FORCE, DEFAULT_MOUSE_SCROLL_FORCE);
		props.put(PROP_MOUSE_SCROLL_DAMPING, DEFAULT_MOUSE_SCROLL_DAMPING);
		props.put(PROP_MOUSE_SCROLL_MAXSPEED, DEFAULT_MOUSE_SCROLL_MAXSPEED);
		props.put(PROP_KEYBOARD_SCROLL_FORCE, DEFAULT_KEYBOARD_SCROLL_FORCE);
		props.put(PROP_KEYBOARD_SCROLL_DAMPING,DEFAULT_KEYBOARD_SCROLL_DAMPING);
		props.put(PROP_KEYBOARD_SCROLL_MAXSPEED,
				DEFAULT_KEYBOARD_SCROLL_MAXSPEED);
		
		props.put(PROP_VERTICAL_ROTATION_MIN, DEFAULT_VERTICAL_ROTATION_MIN);
		props.put(PROP_VERTICAL_ROTATION_MAX, DEFAULT_VERTICAL_ROTATION_MAX);
		props.put(PROP_VERTICAL_ROTATION_CURRENT,
				DEFAULT_VERTICAL_ROTATION_CURRENT);
		props.put(PROP_HORIZONTAL_ROTATION_MIN,DEFAULT_HORIZONTAL_ROTATION_MIN);
		props.put(PROP_HORIZONTAL_ROTATION_MAX,DEFAULT_HORIZONTAL_ROTATION_MAX);
		props.put(PROP_HORIZONTAL_ROTATION_CURRENT,
				DEFAULT_HORIZONTAL_ROTATION_CURRENT);
		props.put(PROP_ZOOM_DISTANCE_MIN, DEFAULT_ZOOM_DISTANCE_MIN);
		props.put(PROP_ZOOM_DISTANCE_MAX, DEFAULT_ZOOM_DISTANCE_MAX);
		props.put(PROP_ZOOM_DISTANCE_CURRENT, DEFAULT_ZOOM_DISTANCE_CURRENT);
		
		props.put(PROP_SCROLL_XVEC, DEFAULT_SCROLL_XVEC);
		props.put(PROP_SCROLL_YVEC, DEFAULT_SCROLL_YVEC);
		props.put(PROP_DIRECTION, DEFAULT_DIRECTION);
		props.put(PROP_WORLD_UP, DEFAULT_WORLD_UP);
		props.put(PROP_WORLD_LEFT, DEFAULT_WORLD_LEFT);
		
		return props;
	}
	
	@SuppressWarnings("unchecked")
	public static HashMap getDefaultBindings() {
		HashMap props = new HashMap();
		
		props.put(CMD_KEY_TOGGLE_MOUSE_LOOK, DEFAULT_KEY_TOGGLE_MOUSE_LOOK);
		props.put(CMD_KEY_TOGGLE_HARDWARE_MOUSE,
				DEFAULT_KEY_TOGGLE_HARDWARE_MOUSE);
		props.put(CMD_MB_TOGGLE_MOUSE_LOOK, DEFAULT_MB_TOGGLE_MOUSE_LOOK);
		
		props.put(CMD_KEY_ROTATE_UP, DEFAULT_KEY_ROTATE_UP);
		props.put(CMD_KEY_ROTATE_DOWN, DEFAULT_KEY_ROTATE_DOWN);
		props.put(CMD_KEY_ROTATE_LEFT, DEFAULT_KEY_ROTATE_LEFT);
		props.put(CMD_KEY_ROTATE_RIGHT, DEFAULT_KEY_ROTATE_RIGHT);
		props.put(CMD_KEY_ZOOM_IN, DEFAULT_KEY_ZOOM_IN);
		props.put(CMD_KEY_ZOOM_OUT, DEFAULT_KEY_ZOOM_OUT);
		
		props.put(CMD_KEY_SCROLL_UP, DEFAULT_KEY_SCROLL_UP);
		props.put(CMD_KEY_SCROLL_DOWN, DEFAULT_KEY_SCROLL_DOWN);
		props.put(CMD_KEY_SCROLL_LEFT, DEFAULT_KEY_SCROLL_LEFT);
		props.put(CMD_KEY_SCROLL_RIGHT,DEFAULT_KEY_SCROLL_RIGHT);
		
		return props;
	}
	
	@SuppressWarnings("unchecked")
	public static HashMap getNoFilterConfig() {
		HashMap props = new HashMap();
		
		float excessForce = 10000;
		float excessDamping = 10000;
		
		props.put(PROP_MOUSE_ROTATION_INTERPOLATION, 0);
		
		props.put(PROP_KEYBOARD_HORIZONTAL_FORCE, excessForce);
		props.put(PROP_KEYBOARD_HORIZONTAL_DAMPING, excessDamping);
		props.put(PROP_KEYBOARD_VERTICAL_FORCE, excessForce);
		props.put(PROP_KEYBOARD_VERTICAL_DAMPING, excessDamping);
		props.put(PROP_KEYBOARD_ZOOM_FORCE, excessForce);
		props.put(PROP_KEYBOARD_ZOOM_DAMPING, excessDamping);
		
		props.put(PROP_MOUSE_SCROLL_FORCE, excessForce);
		props.put(PROP_MOUSE_SCROLL_DAMPING, excessDamping);
		props.put(PROP_KEYBOARD_SCROLL_FORCE, excessForce);
		props.put(PROP_KEYBOARD_SCROLL_DAMPING, excessDamping);
		
		return props;
	}
	
	@SuppressWarnings("unchecked")
	public static HashMap getFilterConfig() {
		HashMap props = new HashMap();
		
		props.put(PROP_MOUSE_ROTATION_INTERPOLATION,
				DEFAULT_MOUSE_ROTATION_INTERPOLATION);
		
		props.put(PROP_KEYBOARD_HORIZONTAL_FORCE,
				DEFAULT_KEYBOARD_HORIZONTAL_FORCE);
		props.put(PROP_KEYBOARD_HORIZONTAL_DAMPING,
				DEFAULT_KEYBOARD_HORIZONTAL_DAMPING);
		props.put(PROP_KEYBOARD_VERTICAL_FORCE,DEFAULT_KEYBOARD_VERTICAL_FORCE);
		props.put(PROP_KEYBOARD_VERTICAL_DAMPING,
				DEFAULT_KEYBOARD_VERTICAL_DAMPING);
		props.put(PROP_KEYBOARD_ZOOM_FORCE, DEFAULT_KEYBOARD_ZOOM_FORCE);
		props.put(PROP_KEYBOARD_ZOOM_DAMPING, DEFAULT_KEYBOARD_ZOOM_DAMPING);
		
		props.put(PROP_MOUSE_SCROLL_FORCE, DEFAULT_MOUSE_SCROLL_FORCE);
		props.put(PROP_MOUSE_SCROLL_DAMPING, DEFAULT_MOUSE_SCROLL_DAMPING);
		props.put(PROP_KEYBOARD_SCROLL_FORCE, DEFAULT_KEYBOARD_SCROLL_FORCE);
		props.put(PROP_KEYBOARD_SCROLL_DAMPING,DEFAULT_KEYBOARD_SCROLL_DAMPING);
		
		return props;
	}

	@SuppressWarnings("unchecked")
	public static HashMap getCustomConfig() {
		HashMap props = new HashMap();
		
		props.put(PROP_MOUSE_SCROLL_MAXSPEED, 300);
		props.put(PROP_KEYBOARD_SCROLL_MAXSPEED, 300);
		
		return props;
	}
	
	@SuppressWarnings("unchecked")
	public static HashMap getDefaultEffectsConfig() {
		HashMap props = new HashMap();
		
		props.put(PROP_TAKEOVER_LOC_SPRING, DEFAULT_TAKEOVER_LOC_SPRING);
		props.put(PROP_TAKEOVER_LOC_DAMPING, DEFAULT_TAKEOVER_LOC_DAMPING);
		props.put(PROP_TAKEOVER_LOC_ACCELFACTOR, DEFAULT_TAKEOVER_LOC_ACCELFACTOR);
		props.put(PROP_TAKEOVER_LOC_MAXSPEED, DEFAULT_TAKEOVER_LOC_MAXSPEED);
		
		props.put(PROP_TAKEOVER_ROT_SPRING, DEFAULT_TAKEOVER_ROT_SPRING);
		props.put(PROP_TAKEOVER_ROT_DAMPING, DEFAULT_TAKEOVER_ROT_DAMPING);
		props.put(PROP_TAKEOVER_ROT_ACCELFACTOR, DEFAULT_TAKEOVER_ROT_ACCELFACTOR);
		props.put(PROP_TAKEOVER_ROT_MAXSPEED, DEFAULT_TAKEOVER_ROT_MAXSPEED);
		
		props.put(PROP_FLYTO_LOC_SPRING, DEFAULT_FLYTO_LOC_SPRING);
		props.put(PROP_FLYTO_LOC_DAMPING, DEFAULT_FLYTO_LOC_DAMPING);
		props.put(PROP_FLYTO_LOC_ACCELFACTOR, DEFAULT_FLYTO_LOC_ACCELFACTOR);
		props.put(PROP_FLYTO_LOC_MAXSPEED, DEFAULT_FLYTO_LOC_MAXSPEED);
		
		props.put(PROP_FLYTO_ROT_SPRING, DEFAULT_FLYTO_ROT_SPRING);
		props.put(PROP_FLYTO_ROT_DAMPING, DEFAULT_FLYTO_ROT_DAMPING);
		props.put(PROP_FLYTO_ROT_ACCELFACTOR, DEFAULT_FLYTO_ROT_ACCELFACTOR);
		props.put(PROP_FLYTO_ROT_MAXSPEED, DEFAULT_FLYTO_ROT_MAXSPEED);
		
		props.put(PROP_FLYTO_ARCH_FACTOR, DEFAULT_FLYTO_ARCH_FACTOR);
		
		return props;
	}
	
}
